"""
11-dars. Mavzu: Stringda %, format, f-strings.
"""


NAME = 'Mohina'
AGE = 10

# string #
# konkatinatsiya - so'zga so'zni qo'shish.
print('1. Ismim ' + NAME + '. \
Yoshim ' + str(AGE) + " da.")

# % string
print('2. Ismim %(name)s. \
Yoshim %(age)d da.' %{'name': NAME, 'age': AGE})
print('3. Ismim %s. Yoshim %d da.' %(NAME, AGE)) #pylint:disable = consider-using-f-string
print('Maxsulot: %s. Narxi: %.2f' %('Sony', 40)) #pylint:disable = consider-using-f-string

# format
print('4. Ismim {}. Yoshim {} da.'.format(NAME, AGE)) #pylint:disable = consider-using-f-string
print('5. Ismim {0}. Yoshim {1} da.'.format(NAME, AGE)) #pylint:disable = consider-using-f-string
print('6. Ismim {name}. Yoshim {age} da.'.format(name=NAME, age=AGE)) #pylint:disable = consider-using-f-string

# f-strings
print(f'7. Ismim {NAME}. Yoshim {AGE} da.')
print(f'8. Ismim {NAME}. Kelasi \
yili {AGE + 1} ga to\'laman.')

print('5 + 2 = {}'.format(5 + 2)) #pylint:disable = consider-using-f-string
print(f'5 + 2 = {5 + 2}')
